package net.sureon.dao;

import java.util.Date;
import java.util.List;
import java.util.Map;


public interface CompanyDAO {
	public Company getCompany(long id);
	public List<Company> getAllCompanies();
	public List getCompanyConfig(long id);
	public Company getCompanyBySiteURL(String siteURL);
	public long insertCompany(Company company);
	public int updateCompany(Company company);
	public int updateCompanyConfig(Map oneConifg);
	public void insertCompanyConfig(Map oneConifg);
	public List<DailyTimingStatistic> getDailyTimingStatisticByCompany(long companyID);
	public List<DailyTimingStatistic> getDailyTimingStatisticByCompany(long companyID, Date startDate, Date endDate);
	
	public float getCompanyBalance(long companyID);
	public Date getLastestConsume(long companyID);
	public List<BalanceOperation> getRecentTenBalanceOperation(long companyID);
	public List<ConsumeRecord> getRecentTenConsumeRecord(long companyID);
	public RealTimeConsume getCompanyConsumeStatus(long companyID, Date theMonth);
	public void insertConsumeRecord(ConsumeRecord record);
	public void insertBalanceOperation(BalanceOperation operation);
	
	public List<Company> getCustomerByStatus(String companyStatus) ;
	
	public List<ConsumeRecord> getAllCompanyRecentTenConsumeRecord() ;
	public List<ConsumeRecord> getRecentTenConsumeRecordInRangeMonth(Date startMonth, Date endMonth);
	
	public List<ConsumeRecord> getConsumeRecordBySiteURLConsumeMonth(Date startMonth, Date endMonth, long companyID);
	
	public List<BalanceOperation> getAllCompanyBalanceOperation();
	/**
	 * 
	 * @param startDate 输入的开始日期
	 * @param endDate 输入的结束日期
	 * @return 在该段时间内的充值情况
	 */
	public List<BalanceOperation> getBalanceOperationByOperationDate(Date startDate, Date endDate);
	/**
	 * 
	 * @param companyID 公司编号
	 * @param startDate 输入的起始日期
	 * @param endDate 输入的结束日期
	 * @return 满足条件的充值情况
	 */
	public List<BalanceOperation> getBalanceOperationByCompanyIDAndOperationDate(long companyID, Date startDate, Date endDate);
	
}